<?php
include_once("../../DataProvider.php");
if(isset($_POST["idCate"]))
{
	$id = $_POST["idCate"];
	$cate = $_POST["cate"];
	$stt = $_POST["stt"];
	
	$sql = "update tbl_categories set categories='$cate', stt = $stt where idCategories = $id";
//	echo $sql;
	$result = DataProvider::ExecuteQuery($sql);
	if($result)
	{
		header("Location: ../categories.php");
	}
	else
	{
		header("Location: ../categories.php");
	}

}
else
{
	header("Location: ../categories.php");
}

?>